import axios from "@/libs/api.request"
let baseUrl = "http://192.168.1.68:18084"

export const getWarehouseList = (data) => {
    return axios.request({
        url: baseUrl + "/jxc/storehouse/get_page",
        params: data,
        method: "get"
    });
}


export const warehouseType = () => {
    return axios.request({
        url: baseUrl + "/jxc/storehouse_type/get_cascade",
        method: "get"
    });
}

/**
 * 
 * @title 新增仓库
 * @method post
 */
export const addWarehouse = (data) => {
    return axios.request({
        url: baseUrl + "/jxc/storehouse",
        data: data,
        method: "post"
    });
}

/***
 *  @title 删除仓库信息
 *  @params id
 *  @method delete
 * 
 */
export const delWarehouse = (data) => {
    return axios.request({
        url: baseUrl + "/jxc/storehouse",
        params: data,
        method: "delete"
    });
}


/**
 *  @title 仓库分类列表
 *  @params 
 *  @method post
 * 
 */
export const getKindList = (data) => {
    return axios.request({
        url: baseUrl + "/jxc/storehouse_type/get_cascade",
        params: data,
        method: "get"
    });
}

/**
 *  @title 新增仓库分类
 *  @params 
 *  @method post
 * 
 */
export const addKind = (data) => {
    return axios.request({
        url: baseUrl + "/jxc/storehouse_type",
        data: data,
        method: "post"
    });
}

/**
 *  @title 编辑分类
 *  @params 
 *  @method put
 * 
 */
export const editKind = (data) => {
    return axios.request({
        url: baseUrl + "/jxc/storehouse_type",
        data: data,
        method: "put"
    });
}

